package org.example.springmvc.dao;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class UserDaoAdvice {
    public UserDaoAdvice(){
//        System.out.println(this.getClass().getName()+"被创建了");
    }

    @Before("execution(* org.example.learnaop.dao.UserDao.getUserList())")
    public void boforeAction(){
        System.out.println("切面Before:UserDAO要开始操作啦");
    }
}
